package com.uzai.console.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.uzai.console.dto.uzaichat.kefutalktype.KefuTalkTypeQuery;
import com.uzai.console.entity.KefuTalkType;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.ArrayList;

@Repository
public interface KefuTalkTypeMapper {
    int deleteById(@Param("id") Long id, @Param("merId") Long merId);

    int insert(KefuTalkType record);

    int insertSelective(KefuTalkType record);

    KefuTalkType selectById(@Param("id") Long id, @Param("merId") Long merId);

    KefuTalkType selectBySort(@Param("id") Long id, @Param("sort") Integer sort, @Param("merId") Long merId);

    int updateByIdSelective(KefuTalkType record);

    int updateById(KefuTalkType record);

    /**
     * 分页查询
     * @param page
     * @param query
     * @return
     */
    ArrayList<KefuTalkType> findByList(Page<KefuTalkType> page, @Param("query") KefuTalkTypeQuery query);

    /**
     * 查询所有
     * @param query
     * @return
     */
    ArrayList<KefuTalkType> findByList(@Param("query") KefuTalkTypeQuery query);
}